![]() |
SndPauseFilePlay |
||||
Header: | Sound.h | Carbon status: | Unsupported | |
Toggles the state of a play from disk in progress, just as you might use the pause button on an audio cassette tape player to temporarily pause and then resume play.
OSErr SndPauseFilePlay ( SndChannelPtr chan );
A pointer to a valid sound channel currently processing a play from disk initiated by a call to the SndStartFilePlay function.
A result code.
The SndPauseFilePlay function suspends the play from disk on the channel specified by the chan parameter if that play from disk is not already paused; the function resumes play if the play from disk is already paused.
The SndPauseFilePlay function is used in conjunction with SndStopFilePlay to control play from disk on a sound channel. This call can be made only if your application has already called SndStartFilePlay with a valid sound channel. You cannot use this function with a synchronous call to SndStartFilePlay because, in that case, program control does not return to the caller until after the sound has completely finished playing.
If the channel specified by the chan parameter is not being used for play from disk, then SndPauseFilePlay returns the result code channelNotBusy. If the channel is busy and paused, then play from disk is resumed. If the channel is busy and the channel is not paused, then play from disk is suspended.
You can call the SndPauseFilePlay function at interrupt time.
Not supported in Carbon. Not available in Carbon.
You should instead use QuickTime to play sound files. Open a sound file as a QuickTime movie and play the movie back. This approach supports more audio formats (like wav and mp3) than this call supported.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)